package com.walking.shopportal.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.Map;

/**
 * @author walking
 */
@FeignClient(value = "order-service") // value是要调用的服务名 标注该类是一个feign接口
public interface OrderClient {
    @PostMapping("/order/create/{productId}")
    Map<String, Object> createOrder(@PathVariable("productId") String productId);
}
